<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TTextSelector类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_t_text_selector.html">TTextSelector</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classawtk_1_1_t_text_selector-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TTextSelector类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.TTextSelector 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_t_text_selector.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0f60a08b103b6f6166bd5770ca21cda6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a0f60a08b103b6f6166bd5770ca21cda6">TTextSelector</a> (long nativeObj)</td></tr>
<tr class="separator:a0f60a08b103b6f6166bd5770ca21cda6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf267fa1115cd3c90e0d534bd15ea6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a5bf267fa1115cd3c90e0d534bd15ea6d">resetOptions</a> ()</td></tr>
<tr class="separator:a5bf267fa1115cd3c90e0d534bd15ea6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90cf2450d4caeb844c083078da6e8301"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a90cf2450d4caeb844c083078da6e8301">countOptions</a> ()</td></tr>
<tr class="separator:a90cf2450d4caeb844c083078da6e8301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacb03375ddbb337f1e622a60fe83fc83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#aacb03375ddbb337f1e622a60fe83fc83">appendOption</a> (int value, String text)</td></tr>
<tr class="separator:aacb03375ddbb337f1e622a60fe83fc83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb581c0bd743620729825111f7e2fe94"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#aeb581c0bd743620729825111f7e2fe94">setOptions</a> (String options)</td></tr>
<tr class="separator:aeb581c0bd743620729825111f7e2fe94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0245d3194b70f807fee7e1d4506d07c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#ae0245d3194b70f807fee7e1d4506d07c">setRangeOptions</a> (int start, int nr, int step)</td></tr>
<tr class="separator:ae0245d3194b70f807fee7e1d4506d07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b8557859934e6c22e3936314624835a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a1b8557859934e6c22e3936314624835a">getValue</a> ()</td></tr>
<tr class="separator:a1b8557859934e6c22e3936314624835a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf0bf3f0126514b43951276caf053bfd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#acf0bf3f0126514b43951276caf053bfd">setValue</a> (int value)</td></tr>
<tr class="separator:acf0bf3f0126514b43951276caf053bfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5cd2d0d6fc4d0d1cfb7908b01f4ed88"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#ad5cd2d0d6fc4d0d1cfb7908b01f4ed88">getTextValue</a> ()</td></tr>
<tr class="separator:ad5cd2d0d6fc4d0d1cfb7908b01f4ed88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a0978887f09b0b88919c7ee63a57c90"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a4a0978887f09b0b88919c7ee63a57c90">setText</a> (String text)</td></tr>
<tr class="separator:a4a0978887f09b0b88919c7ee63a57c90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb0bdb7736ba08b5dd5c5512475072c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#afb0bdb7736ba08b5dd5c5512475072c7">setSelectedIndex</a> (int index)</td></tr>
<tr class="separator:afb0bdb7736ba08b5dd5c5512475072c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbd5651367781f28eca8784924d884dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#acbd5651367781f28eca8784924d884dd">setVisibleNr</a> (int visible_nr)</td></tr>
<tr class="separator:acbd5651367781f28eca8784924d884dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43a8e3d360147226ec1a09733628b0db"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a43a8e3d360147226ec1a09733628b0db">getVisibleNr</a> ()</td></tr>
<tr class="separator:a43a8e3d360147226ec1a09733628b0db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2303ba9223ef88ee21a405fb6d9fd947"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a2303ba9223ef88ee21a405fb6d9fd947">getSelectedIndex</a> ()</td></tr>
<tr class="separator:a2303ba9223ef88ee21a405fb6d9fd947"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af059f60d6a2c1a136088f04689d2ea21"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#af059f60d6a2c1a136088f04689d2ea21">getOptions</a> ()</td></tr>
<tr class="separator:af059f60d6a2c1a136088f04689d2ea21"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ad9a2071dccc4ccd87c266d4c9fbf8afc"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_text_selector.html">TTextSelector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#ad9a2071dccc4ccd87c266d4c9fbf8afc">cast</a> (long nativeObj)</td></tr>
<tr class="separator:ad9a2071dccc4ccd87c266d4c9fbf8afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31419d8bdc757b480b4112829742e032"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a31419d8bdc757b480b4112829742e032">create</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a31419d8bdc757b480b4112829742e032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42eec3ef77e04ef9087e64be1727bc85"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_text_selector.html">TTextSelector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_text_selector.html#a42eec3ef77e04ef9087e64be1727bc85">cast</a> (TWidget widget)</td></tr>
<tr class="separator:a42eec3ef77e04ef9087e64be1727bc85"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>文本选择器控件，通常用于选择日期和时间等。</p>
<blockquote class="doxtable">
<p>XXX: 目前需要先设置options和visible_nr，再设置其它参数(在XML中也需要按此顺序)。 </p>
</blockquote>
<p>text_selector_t是widget\_t的子类控件，widget_t的函数均适用于text_selector_t控件。</p>
<p>在xml中使用"text\_selector"标签创建文本选择器控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">text_selector</span> <span class="keyword">options</span>=<span class="stringliteral">&quot;red;green;blue;gold;orange&quot;</span> <span class="keyword">visible_nr</span>=<span class="stringliteral">&quot;3&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;red&quot;</span>/&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：[text_selector.xml]( </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/text_selector.xml">https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/text_selector.xml</a>)</p>
<p>在c代码中使用函数text_selector_create创建文本选择器控件。如：</p>
<blockquote class="doxtable">
<p>完整示例请参考：[text_selector demo]( </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/text_selector.c">https://github.com/zlgopen/awtk-c-demos/blob/master/demos/text_selector.c</a>)</p>
<p>可用通过style来设置控件的显示风格，如字体和背景颜色等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;dark&quot;</span> <span class="keyword">fg_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>  <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span> <span class="keyword">text_align_h</span>=<span class="stringliteral">&quot;center&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#ffffff&quot;</span> <span class="keyword">mask_color</span>=<span class="stringliteral">&quot;#404040&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#404040&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：[theme default]( </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L443">https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L443</a>) </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a0f60a08b103b6f6166bd5770ca21cda6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f60a08b103b6f6166bd5770ca21cda6">&#9670;&nbsp;</a></span>TTextSelector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">awtk.TTextSelector.TTextSelector </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过nativeObj构造Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="aacb03375ddbb337f1e622a60fe83fc83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacb03375ddbb337f1e622a60fe83fc83">&#9670;&nbsp;</a></span>appendOption()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.appendOption </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>追加一个选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。 </td></tr>
    <tr><td class="paramname">text</td><td>文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ad9a2071dccc4ccd87c266d4c9fbf8afc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9a2071dccc4ccd87c266d4c9fbf8afc">&#9670;&nbsp;</a></span>cast() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_text_selector.html">TTextSelector</a> awtk.TTextSelector.cast </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>把nativeObj转换层Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<a id="a42eec3ef77e04ef9087e64be1727bc85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42eec3ef77e04ef9087e64be1727bc85">&#9670;&nbsp;</a></span>cast() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_text_selector.html">TTextSelector</a> awtk.TTextSelector.cast </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换text_selector对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>text_selector对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>text_selector对象。 </dd></dl>

</div>
</div>
<a id="a90cf2450d4caeb844c083078da6e8301"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90cf2450d4caeb844c083078da6e8301">&#9670;&nbsp;</a></span>countOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TTextSelector.countOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取选项个数。</p>
<dl class="section return"><dt>返回</dt><dd>返回选项个数。 </dd></dl>

</div>
</div>
<a id="a31419d8bdc757b480b4112829742e032"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31419d8bdc757b480b4112829742e032">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TTextSelector.create </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建text_selector对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="af059f60d6a2c1a136088f04689d2ea21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af059f60d6a2c1a136088f04689d2ea21">&#9670;&nbsp;</a></span>getOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.TTextSelector.getOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置可选项(冒号分隔值和文本，分号分隔选项，如:1:red;2:green;3:blue)。 对于数值选项，也可以指定一个范围，用『-』分隔起始值、结束值和格式。 如："1-7-%02d"表示1到7，格式为『02d』，格式为可选，缺省为『d』。 </p>

</div>
</div>
<a id="a2303ba9223ef88ee21a405fb6d9fd947"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2303ba9223ef88ee21a405fb6d9fd947">&#9670;&nbsp;</a></span>getSelectedIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TTextSelector.getSelectedIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前选中的选项。 </p>

</div>
</div>
<a id="ad5cd2d0d6fc4d0d1cfb7908b01f4ed88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5cd2d0d6fc4d0d1cfb7908b01f4ed88">&#9670;&nbsp;</a></span>getTextValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.TTextSelector.getTextValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取text_selector的文本。</p>
<dl class="section return"><dt>返回</dt><dd>返回文本。 </dd></dl>

</div>
</div>
<a id="a1b8557859934e6c22e3936314624835a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b8557859934e6c22e3936314624835a">&#9670;&nbsp;</a></span>getValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TTextSelector.getValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取text_selector的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回值。 </dd></dl>

</div>
</div>
<a id="a43a8e3d360147226ec1a09733628b0db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43a8e3d360147226ec1a09733628b0db">&#9670;&nbsp;</a></span>getVisibleNr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TTextSelector.getVisibleNr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>可见的选项数量(只能是3或者5，缺省为5)。 </p>

</div>
</div>
<a id="a5bf267fa1115cd3c90e0d534bd15ea6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5bf267fa1115cd3c90e0d534bd15ea6d">&#9670;&nbsp;</a></span>resetOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.resetOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>重置所有选项。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aeb581c0bd743620729825111f7e2fe94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb581c0bd743620729825111f7e2fe94">&#9670;&nbsp;</a></span>setOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setOptions </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>选项。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae0245d3194b70f807fee7e1d4506d07c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0245d3194b70f807fee7e1d4506d07c">&#9670;&nbsp;</a></span>setRangeOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setRangeOptions </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置一系列的整数选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">start</td><td>起始值。 </td></tr>
    <tr><td class="paramname">nr</td><td>个数。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="afb0bdb7736ba08b5dd5c5512475072c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb0bdb7736ba08b5dd5c5512475072c7">&#9670;&nbsp;</a></span>setSelectedIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setSelectedIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置第index个选项为当前选中的选项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>选项的索引。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a4a0978887f09b0b88919c7ee63a57c90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a0978887f09b0b88919c7ee63a57c90">&#9670;&nbsp;</a></span>setText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setText </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置text_selector的文本。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="acf0bf3f0126514b43951276caf053bfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf0bf3f0126514b43951276caf053bfd">&#9670;&nbsp;</a></span>setValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setValue </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置text_selector的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="acbd5651367781f28eca8784924d884dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbd5651367781f28eca8784924d884dd">&#9670;&nbsp;</a></span>setVisibleNr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TTextSelector.setVisibleNr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>visible_nr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置可见的选项数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">visible_nr</td><td>选项数。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TTextSelector.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
